package main

import (
	"os"

	"gitee.com/sillyman/mixlog"
)

func init() {
	// 初始化日志记录器
	mixlog.SetGlobalHandlers(
		mixlog.NewHandlerToWriter(mixlog.LvlInfo, mixlog.MustNewFormatter("{{.Lvl}} - {{.Time}} - {{.Message}}", "2006-01-02T15:04:05"), os.Stdout, false),
		mixlog.MustNewHandlerToFile(mixlog.LvlDebug, mixlog.MustNewFormatter(mixlog.FormatFuncNameShortFileName, "2006-01-02T15:04:05.000-07:00"), "debug.log", true),
	)
}
